-- @Author: richardzgt﻿​
-- @Date:   2018-09-26 18:15:07
-- @Last Modified by:   richardzgt﻿​
-- @Last Modified time: 2018-09-30 16:37:59


function write_body()
    local resp_body = string.sub(ngx.arg[1], 1, 1000)
    ngx.ctx.buffered = (ngx.ctx.buffered or"") .. resp_body
    if ngx.arg[2] then
             ngx.var.resp_body = ngx.ctx.buffered
    end
end
write_body()

